<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Calls a SOAP function (deprecated)</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="class.soapclient.html">« SoapClient</a></li>
      <li style="float: right;"><a href="soapclient.construct.html">SoapClient::__construct »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="class.soapclient.html">SoapClient</a></li>
    <li>Calls a SOAP function (deprecated)</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="soapclient.call" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">SoapClient::__call</h1>
  <p class="verinfo">(PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">SoapClient::__call</span> &mdash; <span class="dc-title">Calls a SOAP function (deprecated)</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-soapclient.call-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>SoapClient::__call</strong></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$name</code></span>, <span class="methodparam"><span class="type">array</span> <code class="parameter">$args</code></span>): <span class="type"><a href="language.types.declarations.html#language.types.declarations.mixed" class="type mixed">mixed</a></span></div>

  <p class="para rdfs-comment">
   Calling this method directly is deprecated. Usually, SOAP functions can be
   called as methods of the <span class="classname"><a href="class.soapclient.html" class="classname">SoapClient</a></span> object; in
   situations where this is not possible or additional options are needed, use
   <span class="methodname"><a href="soapclient.soapcall.html" class="methodname">SoapClient::__soapCall()</a></span>.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-soapclient.call-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>
    
     <dt>
<code class="parameter">name</code></dt>

     <dd>

      <p class="para">
       The name of the SOAP function to call.
      </p>
     </dd>

    
    
     <dt>
<code class="parameter">args</code></dt>

     <dd>

      <p class="para">
       An array of the arguments to pass to the function.
       This can be either an ordered or an associative array.
       Note that most SOAP servers require parameter names to be provided, in which case this must be an associative array.
      </p>
     </dd>

    
   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-soapclient.call-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   SOAP functions may return one, or multiple values. If only one value is
   returned by the SOAP function, the return value will be a scalar.
   If multiple values are returned, an associative array of named output
   parameters is returned instead.
  </p>
  <p class="para">
   On error, if the <span class="classname"><a href="class.soapclient.html" class="classname">SoapClient</a></span> object was constructed
   with the <code class="literal">exceptions</code> option set to <strong><code>false</code></strong>,
   a <span class="classname"><a href="class.soapfault.html" class="classname">SoapFault</a></span> object will be returned.
  </p>
 </div>


</div></div></div></body></html>